package cn.wen233.core.service;

import cn.wen233.basic.model.Instance;
import cn.wen233.basic.model.Service;
import cn.wen233.core.filter.InstanceFilter;
import cn.wen233.core.page.PageOut;

import java.util.List;

/**
 * 实例 service
 *
 * @author wenei
 * @date 2021-10-11 14:25
 */
public interface InstanceService {

    Instance findById(String id);

    void heartbeat(String instanceId);

    PageOut<Instance> findPage(InstanceFilter filter);

    List<Instance> getServiceInstance(String namespaceId, String serviceId);

    Instance registerInstance(String namespaceId, String serviceId, String ip, int port);

    void removeInstance(String namespaceId, String serviceId, String id);
}
